package xhwl.hmo.mall.http.api;


import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.hmo.mall.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017/1/16.
 */

public class CardStatusApi extends BaseApi {
    AddressListReq req;

    public CardStatusApi(String type_id, String goods_name,int page_num){
        req=new AddressListReq(type_id,goods_name,page_num);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getCardKind(requestBody);
    }
    public static class AddressListReq {
        private String type_id;
        private String goods_name;
        private int page_num;
        public AddressListReq(String type_id,String goods_name,int page_num){
            this.type_id= type_id;
            this.goods_name=goods_name;
            this.page_num=page_num;
        }
    }
}
